package cn.edu.neusoft.maxingxin231.yuejian06.Activity;

import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;

import cn.edu.neusoft.maxingxin231.yuejian06.R;

public class RecentRaceDetailActivity extends BaseActivity {
    String match_name,match_id,match_pic,match_address,match_phone;
    TextView tv_cname,tv_clubname,tv_like,tv_intro;
    ImageButton imgbtn_return,imgbtn_collect;
    ImageView imageView,img_race;
    @Override
    void initView() {
        setLayout_file(R.layout.activity_recentracedetail);
        imgbtn_return = (ImageButton)findViewById(R.id.imgbtn_return);
        imgbtn_collect = (ImageButton)findViewById(R.id.imgbtn_collect);
        tv_cname = (TextView)findViewById(R.id.tv_cname);
        tv_clubname = (TextView)findViewById(R.id.tv_clubname);
        tv_like = (TextView)findViewById(R.id.tv_like);
        tv_intro = (TextView)findViewById(R.id.tv_intro);
        img_race=(ImageView)findViewById(R.id.img_race);
        match_name=getIntent().getStringExtra("match_name");
        match_phone=getIntent().getStringExtra("match_phone");
        match_id=getIntent().getStringExtra("match_id");
        match_address=getIntent().getStringExtra("match_address");
        match_pic=getIntent().getStringExtra("match_pic");

        tv_cname.setText(match_name);
        tv_clubname.setText(match_phone);
//        tv_like.setText(att_num);
        tv_intro.setText(match_address);
        Picasso.with(RecentRaceDetailActivity.this).load("http://10.0.2.2:80/yuejian14/public/static/match_img/"+match_pic).into(img_race);
        showToast(match_name);
    }

    @Override
    void initEvent() {
        imgbtn_return.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    void initData() {

    }
}
